<template>
    <div class="common-footer-submit">
        <div class="edit-submit">
            <el-button class="srt-el-button srt-el-button--cancel srt-el-button-h36 btn" @click="emit('cancel')">取消</el-button>
            <el-button class="srt-el-button srt-el-button--primary srt-el-button-h36 btn" :disabled="loading" @click="emit('submit')">
                保存
            </el-button>
        </div>
    </div>
</template>

<script setup>
const props = defineProps({
    cancelText: {
        type: String,
        default: '取消'
    },
    submitText: {
        type: String,
        default: '保存'
    },
    loading: { // 保存按钮加载禁用
        type: Boolean,
        default: false
    }
})

const emit = defineEmits(['cancel', 'submit'])
</script>

<style lang="scss" scoped>
.common-footer-submit {
    position: fixed;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0px -2px 10px 0px rgba(0,0,0,0.05);
    padding: 20px 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    .edit-submit {
        text-align: right;
        width: 1200px;
        margin: 0 auto;
    }
    // padding: 30px 0px 0px 0px;
    .btn {
        padding: 0px 23px;
        margin: 0 20px 0 0;
    }
}
</style>